package Polymorphic02;


/**
 * 动物（父类）
 */
public class Animal{
    private String name;
    private int age;
    private String denger;
    public Animal(){}
    public Animal(String name,int age,String denger){
        this.name=name;
        this.age=age;
        this.denger=denger;
    }
    public void jump(){
        System.out.println("喜欢跳");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getDenger() {
        return denger;
    }

    public void setDenger(String denger) {
        this.denger = denger;
    }
}
